package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import com.rockcent.mall.lib.domain.enumclass.MarketMerchantProductSalesStatus;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

/**
 * Created by oyhk on 16/3/4.
 * 分销市场 供应商 分销商 分销产品关系
 */
@Entity
@Table(name = "market_merchant_product_sales")
@DynamicInsert
@DynamicUpdate
public class MarketMerchantProductSales extends IDEntityMall {
    /**
     * 产品 id
     */
    @Column(columnDefinition = "bigint comment '产品 id'")
    private Long productId;
    /**
     * 供应商 平台id
     */
    @Column(columnDefinition = "bigint comment '供应商 平台id'")
    private Long supplierMallId;
    /**
     * 供应商 id
     */
    @Column(columnDefinition = "bigint comment '供应商 id'")
    private Long supplierMerchantId;
    /**
     * 供应商分销状态 PASS("允许"), REFUSE("拒绝")
     */
    @Column(columnDefinition = "varchar(20) comment '供应商分销状态 PASS(\"允许\"), REFUSE(\"拒绝\")'")
    @Enumerated(EnumType.STRING)
    private MarketMerchantProductSalesStatus supplierStatus;
    /**
     * 分销商 平台id
     */
    @Column(columnDefinition = "bigint comment '分销商 平台id'")
    private Long distributorMallId;
    /**
     * 分销商 id
     */
    @Column(columnDefinition = "bigint comment '分销商 id'")
    private Long distributorMerchantId;
    /**
     * 分销商分销状态 PASS("允许"), REFUSE("拒绝")
     */
    @Column(columnDefinition = "varchar(20) comment '分销商分销状态 PASS(\"允许\"), REFUSE(\"拒绝\")'")
    @Enumerated(EnumType.STRING)
    private MarketMerchantProductSalesStatus distributorStatus;

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Long getSupplierMallId() {
        return supplierMallId;
    }

    public void setSupplierMallId(Long supplierMallId) {
        this.supplierMallId = supplierMallId;
    }

    public Long getSupplierMerchantId() {
        return supplierMerchantId;
    }

    public void setSupplierMerchantId(Long supplierMerchantId) {
        this.supplierMerchantId = supplierMerchantId;
    }

    public Long getDistributorMallId() {
        return distributorMallId;
    }

    public void setDistributorMallId(Long distributorMallId) {
        this.distributorMallId = distributorMallId;
    }

    public Long getDistributorMerchantId() {
        return distributorMerchantId;
    }

    public void setDistributorMerchantId(Long distributorMerchantId) {
        this.distributorMerchantId = distributorMerchantId;
    }

    public MarketMerchantProductSalesStatus getSupplierStatus() {
        return supplierStatus;
    }

    public void setSupplierStatus(MarketMerchantProductSalesStatus supplierStatus) {
        this.supplierStatus = supplierStatus;
    }

    public MarketMerchantProductSalesStatus getDistributorStatus() {
        return distributorStatus;
    }

    public void setDistributorStatus(MarketMerchantProductSalesStatus distributorStatus) {
        this.distributorStatus = distributorStatus;
    }

    @Override
    public String toString() {
        return "MarketMerchantProductSales{" +
                "productId=" + productId +
                ", supplierMallId=" + supplierMallId +
                ", supplierMerchantId=" + supplierMerchantId +
                ", supplierStatus=" + supplierStatus +
                ", distributorMallId=" + distributorMallId +
                ", distributorMerchantId=" + distributorMerchantId +
                ", distributorStatus=" + distributorStatus +
                '}';
    }
}
